package cn.gs.controller.lambdaTest;

public class Husband {

    private void buyHouse(){
        System.out.println("买套房子！！！");
    }

    private void marry(Richable rich){
        rich.buy();
    }

    public void beHappy(){
        marry(() -> System.out.println("买套房子"));
        marry(  ()-> this.buyHouse() );
        marry( this::buyHouse );
    }

}
